package last.tomsquare;

import common.totalInfo.*;
import java.util.ArrayList;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ListView;

public class Place extends Activity 
{
	ArrayList<String> al;
	/** Called when the activity is first created. */
	@Override	
	public void onCreate(Bundle savedInstanceState) 
	{
	    super.onCreate(savedInstanceState);
	    setContentView(R.layout.place);
	    
	    al=new ArrayList<String>();
	    
	    al.add("Kosta");
	    al.add("김밥천국");
	    al.add("부킹호프");
	    al.add("헌팅주점");
	    
	    ArrayAdapter<String> Adapter;
	    Adapter=new ArrayAdapter<String>(this,android.R.layout.simple_list_item_1,al);
	    
	    ListView list=(ListView)findViewById(R.id.list);
	    list.setAdapter(Adapter);	
	
	    list.setOnItemClickListener(new AdapterView.OnItemClickListener() 
	    {
	         public void onItemClick(AdapterView parent, View view, int position, long id)
	         {
	          if(position == 0)
	          {
	           Intent intent = new Intent(Place.this, PlaceInfo.class);
	           
	           startActivity(intent);
	          }
	         }
	    });
	}
}
		
	         
	         


		
	    
	    
	    
	   
	

	
